package core.actions;

import core.CustomUtil;
import core.weapons.Bullet;

public class NextUnit extends Action{

	public NextUnit(){
		super();
		name="Next_unit";
		imageName="iconNext.png";
		color = ActionConstants.selectionColor;
		nameChar='N';
		energyCost=0;
		value=0;
		reset();
	}
	
	public void execute(){
		CustomUtil.selectNextUnit(master);
		/*int unitIndex = master.getPlayerData().getUnits().indexOf(master.getSelectedUnit());
		int baseIndex = unitIndex;
		do{
			unitIndex++;
			if(master.getPlayerData().getUnits().size() <= unitIndex)
				unitIndex = 0;
			if(master.getPlayerData().getUnits().get(unitIndex).isAlive()){
				master.selectUnit( master.getPlayerData().getUnits().get(unitIndex) );
				break;
			}			
		}while (unitIndex != baseIndex);
		System.out.println("Unit selected");*/
	}
}
